<template>
	<view v-if=" type==0 || type==1">
		<view class="reception-block" v-if="receptionObj" >
			<scroll-view scroll-x="true" class="kite-classify-scroll">
				<view class="user-info-block" v-for="item in receptionObj">
					<view class="user">
						<image :src="item.headPortrait" class="img"></image>
						<view class="txt">{{item.name}} </view>
						<view class="time">{{getDate(item.creation_time)}}</view>
					</view>
					<view v-if="item.text" class="txts">
						{{item.text}}
					</view>
					<view v-else class="txts">
						该用户未发表评价内容
					</view>
				</view>
				
<!-- 				<view class="user-info-block">
					<view class="user">
						<image :src="receptionObj.headPortrait" class="img"></image>
						<view class="txt">{{receptionObj.name}} </view>
						<view class="time">{{getDate(receptionObj.creation_time)}}</view>
					</view>
					<view class="txts">
						{{receptionObj.text}}2
					</view>
				</view>
				
				<view class="user-info-block">
					<view class="user">
						<image :src="receptionObj.headPortrait" class="img"></image>
						<view class="txt">{{receptionObj.name}} </view>
						<view class="time">{{getDate(receptionObj.creation_time)}}</view>
					</view>
					<view class="txts">
						{{receptionObj.text}}3
					</view>
				</view> -->
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			type: {
				type: Number,
				default: 0
			},
		},
		data() {
			return {
				receptionObj: {},
				rightIcon: require('@/static/public/rightOption.png'),
			}
		},
		methods: {
			init(data) {
				this.receptionObj = data
			},
			goToPath() {
				uni.navigateTo({
					url: '/pages/commodityEvaluate/commodityEvaluate?id=' + this.receptionObj.id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.reception-block {
		margin-bottom: 24rpx;
		background: #fff;
		 
		background: #FAFAF5FF;
		.kite-classify-scroll {
			width: 100%;
			overflow: hidden;
			white-space: nowrap;
		}

		.hint-title {
			padding-top: 40rpx;
			display: flex;

			.title {
				font-size: 30rpx;
				font-weight: 500;
				color: rgba(27, 25, 25, 1);
				flex: auto;
			}

			.right-option {
				flex: none;
				display: flex;
				align-items: center;
				font-size: 24rpx;
				font-weight: 500;
				color: rgba(203, 60, 40, 1);

				.img {
					margin-left: 13rpx;
					width: 13rpx;
					height: 23rpx;
				}
			}
		}
		.user-info-block {
		
			display: inline-block;
			// margin-top: 34rpx;
			padding:24rpx;
			width: 650rpx;
			height: 100%;
			margin-right: 24rpx;
			background: #fff;
			.user {
				display: flex;
				align-items: center;
				.img {
					width: 60rpx;
					height: 60rpx;
					border-radius: 50%;
					 
				}

				.txt {
					font-size: 28rpx;
					font-weight: 500;
					color: rgba(0, 0, 0, 1);
					margin-left: 20rpx;
				}
				.time{
					flex: auto;
					font-size: 26rpx;
					text-align: right;
				}
			}

			.txts {
				margin-top: 24rpx;
				font-size: 28rpx;
				font-weight: 400;
				color: rgba(102, 102, 102, 1);
			}
		}
	}
</style>
